home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / snmp / snmp-traps.py < prev    next >
Text File  |  2005-02-12  |  318b  |  19 lines

  1. import socket
  2.  
  3. class SNMPTrapsServer:
  4. def __init__(self):
  5. pass
  6.  
  7. def start(self):
  8. self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  9. self.s.bind(("0",162))
  10. while 1:
  11. snmp = self.s.recv(1500)
  12. print snmp[73:]
  13.  
  14. def stop(self):
  15. self.s.close()
  16.  
  17. server = SNMPTrapsServer()
  18. server.start()
  19. server.stop()